package com.zb.vo;

import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author WEN
 * @Date 2023/7/18 0018
 **/
@Data
@ApiModel("登录类实体")
public class LoginVo {

    @NotNull(message = "登录类型不能为空")
    @NumberPattern(regexp = "^(1|2)$", message = "登录类型参数不合法")
    @ApiModelProperty(value = "登录类型：1-验证码，2-账号/手机号密码", required = true, example = "1")
    private Integer type;

    @NotBlank(message = "手机号或登录账号不能为空")
    @ApiModelProperty(value = "手机号/登录账号", required = true)
    private String phone;

    @NotBlank(message = "登录密码或验证码不能为空")
    @ApiModelProperty(value = "登录密码/验证码", required = true)
    private String password;

    @ApiModelProperty(value = "记住我：true-是，false-否", example = "false")
    private Boolean rememberMe = false;

}
